﻿// MyNotes - Free Sticky Notes
// Copyright (C) 2011 Alexandre Vicenzi
// 
// This program is free software; you can redistribute it and/or modify it under 
// the terms of the GNU General Public License as published by the Free Software 
// Foundation; either version 3 of the License, or (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful, but WITHOUT 
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 
// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along with 
// this program; if not, write to the Free Software Foundation, Inc., 
// 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;

namespace MyNotes
{
    public partial class FrmConfig : Form
    {
        public FrmConfig()
        {
            InitializeComponent();

            this.cbAutoStart.Checked = Configurations.StartupWithSystem;
            this.cbAutoUpdate.Checked = Configurations.AutoUpdate;
            this.cbShowInTaskbar.Checked = Configurations.ShowInTaskbar;
            this.cbCalendar.Checked = Configurations.ShowCalendar;
            //this.cbLanguage.Items.AddRange(Translate.GetAllSupportedLanguages());
            this.cbLanguage.SelectedText = Configurations.AppLanguage;
            this.cbColor.Items.AddRange(AnnotationColor.GetAllColors());
            this.cbColor.SelectedItem = Configurations.DefaultColorNote;
            //this.btnFont.Text = String.Format("{0} - {1}" ,Configurations.DefaultFont.Name, Configurations.DefaultFont.Size);
        }

        private void btnFont_Click(object sender, EventArgs e)
        {
            Font font;
            if (fontDialog.ShowDialog() == DialogResult.OK)
                font = fontDialog.Font;
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            Dispose();
        }

        private void btnOk_Click(object sender, EventArgs e)
        {
            Configurations.SaveConf();
            Dispose();
        }
    }
}
